package com.example.myapp.players;

import com.example.myapp.utils.StateAnalysis;

import java.util.List;

public class SelectFirstBot extends Bot{
    @Override
    public int[] getNextStep(int[] stateMatrix, int faction) {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        List<int[]> capable = StateAnalysis.listCapablePoints(getGame(), faction);
        if (capable.size() < 1) {
            return new int[]{-1, -1};
        } else {
            return capable.get(0);
        }
    }

    public SelectFirstBot(int f) {
        this.setFaction(f);
    }
}
